package com.lxw.api.search;

import com.lxw.framework.domain.course.CoursePub;
import com.lxw.framework.domain.course.TeachplanMediaPub;
import com.lxw.framework.domain.search.CourseSearchParam;
import com.lxw.framework.model.response.QueryResponseResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;

import java.util.Map;

@Api(value="ES搜索Controller",description = "负责前端页面的搜索功能")
public interface EsCourseSearchApi {
    @ApiOperation("课程搜索")
    @ApiImplicitParams({
            @ApiImplicitParam(value = "页码",name = "page",dataType = "int",required = true),
            @ApiImplicitParam(value = "尺寸",name = "size",dataType = "int"),
            @ApiImplicitParam(value = "索引信息",name = "courseSearchParam",dataType = "CourseSearchParam")
    })
    public QueryResponseResult searchCourse(Integer page, Integer size, CourseSearchParam courseSearchParam);

    @ApiOperation("根据课程Id从索引库中获取课程信息")
    @ApiImplicitParams({
            @ApiImplicitParam(value = "课程Id",name = "courseId",paramType = "path",dataType = "String",required = true)
    })
    public Map<String, CoursePub> getAllCourseById(String courseId);

    @ApiOperation("根据课程计划查询媒资信息")
    @ApiImplicitParams({
            @ApiImplicitParam(value = "课程计划Id",name = "teachplanId",paramType = "path",dataType = "String",required = true)
    })
    public TeachplanMediaPub getmedia(String teachplanId);
}

